package com.starleague.hexagonal.flat.jpa.appengine;

import javax.persistence.MappedSuperclass;

import com.starleague.hexagonal.HexOutOfBoundsException;
import com.starleague.hexagonal.IHexCoordinate;
import com.starleague.hexagonal.flat.IFlatHexGrid;
import com.starleague.hexagonal.jpa.appengine.AbstractHexGridGae;

@MappedSuperclass
public abstract class AbstractFlatHexGridGae
        extends AbstractHexGridGae
        implements IFlatHexGrid
{
    protected AbstractFlatHexGridGae(int minGridX,
                             int minGridY,
                             int numHexesX,
                             int numHexesY)
    {
        super(minGridX, minGridY, numHexesX, numHexesY);
    }

    protected AbstractFlatHexGridGae()
    {
        //
    }

    @Override
    public AbstractFlatHexGae getHexAt(IHexCoordinate hexCoordinate) throws HexOutOfBoundsException
    {
        return (AbstractFlatHexGae) super.getHexAt(hexCoordinate);
    }
}
